package com.huey.utils.design.creation.respon;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 抽象类定义
 * @author xubo
 * @date 2022/8/5 10:03
 */
public  abstract  class AuthLink {


    // 时间格式化
    protected SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    // 级别人员ID
    protected String levelUserId;
    // 级别人员姓名
    protected String levelUserName;
    // 责任链
    private AuthLink next;

    public AuthLink(String levelUserId, String levelUserName) {
        this.levelUserId = levelUserId;
        this.levelUserName = levelUserName;
    }

    public AuthLink next() {
        return next;
    }

    public AuthLink appendNext(AuthLink next) {
        this.next = next;
        return this;
    }

    public abstract AuthInfo doAuth(String uId, String orderId, Date authDate);
}
